package com.two.shopping.service.serviceImpl;

import com.two.shopping.anno.Log;
import com.two.shopping.mapper.IUserSetUpMapper;
import com.two.shopping.pojo.User;
import com.two.shopping.service.IUserSetUPService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

@Slf4j
@Service
public class UserSetUpServiceImpl implements IUserSetUPService {
    @Autowired
    private IUserSetUpMapper userSetUpMapper;

    //修改用户信息
    @Override
    public void Update(User user) {
        log.info("修改用户过程中，User对象传递至Service层，具体值{}", user);
        user.setUpdateTime(LocalDateTime.now());
        userSetUpMapper.update(user);
    }
}
